

<h1>抽奖</h1>

<div class="form">

 
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	// 'action'=>'bingo',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'level'); ?>
		<?php
		    echo $form->dropDownList(
		            $model, 
		            'level', 
		            array('1'=>'一等奖 幸运大奖奥迪A1','2'=>'二等奖 尊享大奖匈牙利红酒','3'=>'三等奖 惊喜奖西凤国花瓷礼品','4'=>'特等奖 乐享奖红星软香酥')
		      );
		?>
		<?php echo $form->error($model,'level'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'num'); ?>
		<?php echo $form->textField($model,'num'); ?>
		<?php echo $form->error($model,'num'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'eventid'); ?>
		<?php
		    echo $form->dropDownList(
		            $model, 
		            'eventid', 
		            
		            CHtml::listData(
	                    Event::model()->findAll(),
	                    'id', 
	                    'title'
	                )
		      );
		?>
		<?php echo $form->error($model,'eventid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'userid'); ?>
		<?php echo $form->textField($model,'userid'); ?>
		<?php echo $form->error($model,'userid'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton( ' 开始抽奖 ' ); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->